CC 		= gcc
CFLAGS 	= -Wall -g -O -fPIC
INCLUDE = -I ./inc -I ../comm/inc
TARGET 	= libmytest.so
LIBPATH = ./libs

vpath %.h ./inc

OBJS    = dynamiclib_add.o dynamiclib_mul.o
SRCS    = dynamiclib_add.c dynamiclib_mul.c

all: $(OBJS)
	$(CC) -shared -fPIC -o ./libs/$(TARGET) $(OBJS)

$(OBJS): $(SRCS)
	$(CC) $(CFLAGS) $(INCLUDE) -c $^

clean:
	rm -f *.o
	rm -f $(LIBPATH)/*


